package com.thread;

import com.mapper.AccountMapper;
import com.model.account.Account;
import com.service.account.AccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RestController;

/**
 * 给AccessTokenThread服务
 */
public class GetAccount {
    @Autowired
    private AccountService accountService;
    @Autowired
    private AccountMapper accountMapper;
    //公众号id
    private static String accountid;
    // 第三方用户唯一凭证
    public  String appid ;
    // 第三方用户唯一凭证密钥
    public  String appsecret ;


    public String getAppsecret(){
        Account account= accountService.findById(accountid);
        this.appsecret=account.getAppSecrect();
        return appsecret;
    }
    public String getAppid(){
        Account account= accountMapper.findById(accountid);
        this.appid=account.getAppId();
        return appid;
    }
    public static void getAccountid(String id){
        accountid=id;
    }
}
